<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Grid布局</title>
    <style>
        .parent {
            width: 400px;
            height: 400px;
            margin: 50px auto;
            background-color: cyan;

            display: grid;
            grid-template-rows: repeat(3, 1fr);
            grid-template-columns: repeat(3, 1fr);

            /* 网格区域内的对齐 */
            /* 与单元格内的对齐一摸一样 */
            place-items: start start;
            place-items: center;
        }

        .child {
            width: 40px;
            height: 40px;
            background-color: lightblue;
        }

        .item01 {
            /* 设置网格区域 */
            grid-row: span 3;
            background-color: orange;
        }

        .item02 {
            /* 设置网格区域 */
            grid-row: span 2;
            grid-column: span 2;
            background-color: red;
        }
    </style>
</head>

<body>

    <div class="parent">
        <div class="child item01">1</div>
        <div class="child item02">2</div>
    </div>

</body>

</html>